import React from "react";
import { HashRouter, Routes, Route } from 'react-router-dom'
import App from '../App' 
import Login from '../views/login'
import Home from '../views/home'
import UserList from '../views/user/UserList'
import RolesList from "../views/roles/RolesList";
import RightsList from "../views/rights/RightsList";
import GoodsList from "../views/goods/GoodsList";
import AddOrEditGoods from "../views/goods/AddOrEditGoods";
import ParamsList from "../views/param/ParamsList";
import CategoriesList from "../views/categories/CategoriesList";
import OrdersList from "../views/orders/OrdersList";
import Reports from "../views/reports/Reports";

const routes = () => {
  return (
    <HashRouter>
      <Routes>
        <Route path="/" element={<App/>}>
          <Route path="/" element={<Home/>} />
          <Route path="/users" element={<UserList/>} />
          <Route path="/roles" element={<RolesList/>} />
          <Route path="/rights" element={<RightsList/>} />
          <Route path="/goods" element={<GoodsList/>} />
          <Route path="/goods/add" element={<AddOrEditGoods/>} />
          <Route path="/goods/edit/:id" element={<AddOrEditGoods/>} />
          <Route path="/params" element={<ParamsList/>} />
          <Route path="/categories" element={<CategoriesList/>} />
          <Route path="/orders" element={<OrdersList/>} />
          <Route path="/reports" element={<Reports/>} />
        </Route>
        <Route path="/login" element={<Login/>} />
      </Routes>
    </HashRouter>
  )
}

export default routes